package com.hpq.common.domain.vo.request;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

/**
 * 基本分页请求
 */
@Data
@ApiModel(description = "分页请求")
public class PageBaseReq {
    @ApiModelProperty(value = "页面大小")
    @Max(50)
    @Min(0)
    private Integer pageSize=10;

    @ApiModelProperty("页面索引")
    private Integer pageNo = 1;

    public Page plusPage(){
        return new Page(pageNo, pageSize);
    }
}
